<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
	<head>
		<base href="<%=basePath%>">
		<meta charset="utf-8" />
		<!--下拉框 -->
		<link rel="stylesheet" href="front/css/chosen.css" type="text/css" />
		<link rel="stylesheet" href="front/css/normal.css">
	    <link rel="stylesheet" href="front/css/addBox.css">
	</head>
<body>
   <p class="addSlide-title">申请开户<span>×</span></p>
	<form action="oafilialeapplyaccount/${msg }.do" name="Form" id="Form" method="post">
		<input type="hidden" name="filiale_account_id" id="filiale_account_id" value="${pd.filiale_account_id}"/>
	    <input type="hidden" name="filiale_id" id="filiale_id" value="${pd.filiale_id}"/>
		<ul class="addList">
			<li><span>申请人:</span><input type="text" name="filiale_account_applyman" id="filiale_account_applyman" value="${pd.filiale_account_applyman}" maxlength="32" placeholder="这里输入" title=""/></li>
			<li><span>申请人电话:</span><input type="text" onblur="javascript:phoneNum();"  name="filiale_account_phone" id="filiale_account_phone" value="${pd.filiale_account_phone}" maxlength="32" placeholder="这里输入" title=""/></li>
			<li><span>开户类型:</span>
				<select  class='select'  name="filiale_account_type" id="filiale_account_type" data-placeholder="请选择开户类型">
		           <option value="" ></option>
		           <option value="1">基本户</option>
		           <option value="2">一般户</option>
		        </select>
			</li>
			<li><span>开户准备资料:</span><textarea  name="filiale_account_needdata" id="filiale_account_needdata" rows="5" cols="5" placeholder="这里输入" title=""></textarea>
			</li>
		</ul>
		<p>
	        <input type="button"  onclick="cancel()" value="取消保存" class='cancelSave'>
	        <input type="button" onclick="save();" value="确认保存" class='confirmSave'>
	    </p>
	</form>
	<script src="front/js/jquery-2.0.3.min.js"></script>
	<!-- 下拉框 -->
	<script src="front/js/chosen.jquery.js"></script>
	<script type="text/javascript" src="front/js/jquery.tips.js"></script>	
	<script src="front/js/index.js"></script>
	<script type="text/javascript">
	$(function(){
		//下拉框
	     $(".select").chosen();
  	});
	function cancel(){
		$('#zhongxin', parent.document).hide();
	}
	
	//手机号验证
	function phoneNum(){
		var phone = $("#filiale_account_phone").val();	
		if(phone && /^1[3|4|5|8]\d{9}$/.test(phone)){
			return true;
		} else{
			$("#filiale_account_phone").tips({
				side:3,
	            msg:'请输入正确的手机号',
	            bg:'#AE81FF',
	            time:2
			});
			return false;
		}
	}   
	
	//保存
	function save(){
		if($("#filiale_account_applyman").val()==""){
			$("#filiale_account_applyman").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#filiale_account_applyman").focus();
			return false;
		}
		
		if($("#filiale_account_phone").val()==""){
			$("#filiale_account_phone").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#filiale_account_phone").focus();
			return false;
		}
		if($("#filiale_account_type").val()==""){
			$("#filiale_account_type").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#filiale_account_type").focus();
			return false;
		}
		if($("#filiale_account_needdata").val()==""){
			$("#filiale_account_needdata").tips({
				side:3,
	            msg:'请输入',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#filiale_account_needdata").focus();
			return false;
		}

		if(phoneNum()){
			$("#Form").submit();
		}
	}
	</script>
</body>
</html>